import React, { useReducer } from 'react';
// import { getItem } from '@zhangcheck/mp-react/storage';
import MpApp from '@zhangcheck/mp-ui/components/app';
import MpuiLoader from '@zhangcheck/mp-ui/h5-index';
import tabbarConfig from '../utils/tabbar.config';
import './app.css';

import NotFound from './notFound/NotFound';
import HomeLoader from './home/HomeLoader';

function App(props) {
  return (
    <MpApp
      routes={[
        { path: '/', component: HomeLoader },
        { path: '/pages/index/index', component: HomeLoader },
        { path: '/pages/mp-ui', component: MpuiLoader },
        { path: null, component: NotFound },
      ]}
      tabbar={tabbarConfig.list}
      initialState={{}}
      {...props}
    />
  );
}

export default App;
